Method and apparatus for estimating a property of a fluid downhole

ABSTRACT

A method for estimating a property of a fluid downhole is disclosed, the method including but not limited to exposing the fluid to light downhole; directing different wavelengths of light that have interacted with the fluid light toward a first optical grating; measuring light at different wavelengths reflected from the first optical grating; and estimating a property of the fluid from the measured light. An apparatus for estimating a property of a fluid downhole is disclosed, the apparatus including but not limited to a downhole tool for estimating a property of a fluid downhole, including but not limited to a light source that illuminates the fluid downhole; a first optical grating having a plurality of elements that selectively light that have interacted with the fluid; and a sensor that measures the light reflected from the first optical grating elements.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part of co-pending U.S.application Ser. No. 11/330,283 filed Jan. 11, 2006, the full disclosureof which is hereby incorporated by reference herein. U.S. applicationSer. No. 11/330,283 claims priority from U.S. patent application Ser.No. 10/985,715 filed on Nov. 10, 2004 entitled “Method and Apparatus forA Downhole Spectrometer based on Electronically Tunable OpticalFilters,” which claims priority from U.S. Provisional patent applicationSer. No. 60/518,965 filed on Nov. 10, 2003, both of which are herebyincorporated by reference in their entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the field of downhole fluid analysis inhydrocarbon producing wells for determining fluid density, viscosity,and other parameters for a fluid downhole in a borehole duringproduction, monitoring while drilling or wire line operations.

2. Background Information

Oil and gas companies spend large sums of money to find hydrocarbondeposits. Oil companies drill exploration wells in their most promisingprospects and use these exploration wells, not only to determine whetherhydrocarbons are present but also to determine the properties of thosehydrocarbons, which are present.

To determine hydrocarbon properties, oil and gas companies oftenwithdraw some hydrocarbons from the well. Wireline formation testers canbe lowered into the well for this purpose. Initially, fluids that arewithdrawn may be highly contaminated by filtrates of the fluids (“muds”)that were used during drilling. To obtain samples that are sufficientlyclean (usually <10% contamination) so that the sample will providemeaningful lab data concerning the formation, formation fluids aregenerally pumped from the wellbore for 30-90 minutes, while clean up isbeing monitored in real time. Then, these withdrawn fluids can becollected downhole in tanks for subsequent analysis in a laboratory atthe surface.

Alternatively, for some properties, samples can be analyzed downhole inreal time. The present invention relates both to monitoring sample cleanup and to performing downhole analysis of samples at reservoirconditions of temperature and pressure. A downhole environment is adifficult one in which to operate a sensor. Measuring instruments in thedownhole environment must operate under extreme conditions and limitedspace within a tool's pressure housing, including elevated temperatures,extreme vibration, and shock.

SUMMARY

A method for estimating a property of a fluid downhole is disclosed, themethod including but not limited to exposing the fluid to lightdownhole; directing different wavelengths of light that have interactedwith the fluid light toward a first optical grating; measuring light atdifferent wavelengths reflected from the first optical grating; andestimating a property of the fluid from the measured light. An apparatusfor estimating a property of a fluid downhole is disclosed, theapparatus including but not limited to a downhole tool for estimating aproperty of a fluid downhole, including but not limited to a lightsource that illuminates the fluid downhole; a first optical gratinghaving a plurality of elements that selectively light that haveinteracted with the fluid; and a sensor that measures the lightreflected from the first optical grating elements.

Examples of certain features of the invention have been summarized hererather broadly in order that the detailed description thereof thatfollows may be better understood and in order that the contributionsthey represent to the art may be appreciated. There are, of course,additional features of the invention that will be described hereinafter.

BRIEF DESCRIPTION OF THE FIGURES

For a detailed understanding of the present invention, references shouldbe made to the following detailed description of the exemplaryembodiment, taken in conjunction with the accompanying drawings, inwhich like elements have been given like numerals, wherein:

FIG. 1 is a schematic diagram of an illustrative embodiment of thepresent invention deployed on a wireline in a downhole environment;

FIG. 2 is a schematic diagram of an illustrative embodiment of thepresent invention deployed on a drill string in a monitoring whiledrilling environment;

FIG. 3 is a schematic diagram of an illustrative embodiment of thepresent invention deployed on a flexible tubing in a downholeenvironment;

FIG. 4 is a schematic diagram of an illustrative embodiment of thepresent invention as deployed in a wireline downhole environment showinga cross section of a formation tester tool;

FIG. 5 is a schematic diagram of an illustrative embodiment showing amicro electromechanical system (MEMS) tunable optical grating (TOG)spectrometer;

FIG. 6 is a schematic diagram of mirrored members in a TOG in anillustrative embodiment;

FIG. 7 is a flow chart illustrating collection and analysis of spectrafor an unknown fluid in an illustrative embodiment;

FIG. 8 is a flow chart illustrating sweeping a wavelength range to findspectral peaks in an illustrative embodiment;

FIG. 9 is a depiction of an apparatus for performing Hadamardspectroscopy in a particular illustrative embodiment; and

FIG. 10 is a flow chart illustrating fluids exposed to light in adownhole.

DETAILED DESCRIPTION OF THE INVENTION

Due to the uncertainties and enormous expenditures associated withproducing hydrocarbons for a formation, down hole sampling of formationsare critical to the planning oil companies undergo prior to undertakingproduction. Thus, oil companies consider down hole indications offormation fluid properties indispensable because these downholeindication of formation fluid properties are extremely helpful inaccurately indicating the feasibility of producing oil and gas from ahydrocarbon bearing formation. Thus there is great public benefitprovided by the illustrative embodiment as it aids in the efficientplanning and production of energy. For these reasons, oil companies arewilling to pay significant amounts of money for the estimations of fluidproperties down hole, as provided by a illustrative embodiment.

In a particular illustrative embodiment, a method is disclosed forestimating a property of a fluid downhole, the method including but notlimited to exposing the fluid to light downhole; reflecting differentwavelengths of light that have interacted with the fluid from a firstoptical grating; measuring light at different wavelengths reflected fromthe first optical grating; and estimating a property of the fluid fromthe measured light. In another particular illustrative embodiment of themethod, the light interacting with the fluid further comprises lightselected from the group consisting of light reflecting off of the fluidand light passing through the fluid.

In another particular illustrative embodiment of the method the firstoptical grating further includes but is not limited to a plurality ofelements, the method further including but not limited to activating aportion of the plurality of elements on the first optical grating toselect a band of wavelengths of light reflected by the activatedportion. In another particular illustrative embodiment of the method,the method further includes but is not limited to, reflecting differentwavelengths of light that have interacted with the fluid from a secondoptical grating that reflects a different wavelength of light onto eachof the elements of the first optical grating. In another particularillustrative embodiment of the method further includes but is notlimited to exposing a secondary fluid to light; estimating a property ofthe secondary fluid; comparing the property of the fluid to the propertyof the secondary fluid; and determining whether the fluid derives fromthe same formation compartment as the secondary fluid.

In another particular illustrative embodiment of the method theplurality of elements further comprises an upper row of the plurality ofelements aligned above a lower row of the plurality of elements. Inanother particular illustrative embodiment of the method the lower rowof elements does not reflect light from the first optical grating. Inanother particular embodiment, the lower row of elements reflects lightthat is not measured by the optical sensor that measures the lightreflected from the upper row of elements.

In another particular illustrative embodiment of the method, the methodfurther includes but is not limited to performing Hadamard spectroscopyon the light measured from the activated portion of the first opticalgrating. In another particular illustrative embodiment of the method,the method further includes but is not limited to optically multiplexingthe light reflected from each element of the first optical grating. Inanother particular illustrative embodiment of the method, the firstoptical grating further comprises a tunable optical filter and theelements further comprise mirrored members. In another particularillustrative embodiment of the method, the method further includes butis not limited to filtering the light reflected from the TOG before thereflected light is measured.

In another particular illustrative embodiment a downhole tool isdisclosed for estimating a property of a fluid downhole. In a particularillustrative embodiment, the downhole tool includes but is not limitedto a light source that illuminates the fluid downhole; a first opticalgrating having a plurality of elements that selectively reflect lightthat have interacted with the fluid; and a sensor that measures thelight reflected from the first optical grating elements. In anotherparticular illustrative embodiment, the downhole tool further includes,but is not limited to a grating that reflects a different wavelength oflight onto each of the plurality of elements of the first opticalgrating, wherein when each of the plurality of elements is activated,each of the plurality of elements reflects the different wavelength oflight which impinges upon the activated element.

In another particular illustrative embodiment of the downhole tool, thedownhole tool further includes, but is not limited to, a circuit thatselectively actuates each of the plurality of elements of the firstoptical grating to vary a wavelength of light reflected by the firstoptical grating. In another particular embodiment, the downhole toolfurther includes but is not limited to an optical filter positionedbetween the optical detector and the first optical grating, wherein theoptical filter reduces a spectra of light reflected from the firstoptical grating. In another particular embodiment, the downhole toolfurther includes but is not limited to a filter positioned between thefluid and the first optical grating that reduces the spectra of lightreflected from the fluid. In another particular embodiment, the downholetool further includes but is not limited to a processor in datacommunication with the photodetector that estimates a property of thefluid downhole from data from the photodetector, wherein the processoris configured to use the data from the photodetector and a soft modelingtechnique to estimate the property of the fluid. In another particularembodiment, the downhole tool further includes but is not limited to areference fluid in optical communication with the light source and thefirst optical grating, wherein the processor is configured to estimatethe property of the fluid based on a comparison to the reference fluid.

In another particular embodiment of the downhole tool, the elements canbe, but are not limited to a multiplicity of mirrored members orelements, wherein the elements are individually selectable to reflectthe light. In a particular embodiment the elements of an upper row areselectable to reflect light to an optical sensor and the elements of alower row do not reflect light to the optical sensor. In one aspect ofthe invention a method is provided for estimating a property of a fluiddownhole. The method provides for exposing the fluid to light,reflecting light that have interacted with the fluid off of a microelectromechanical system (MEMS) tunable optical grating (TOG) having afirst mirrored member and a second mirrored member. In an illustrativeembodiment, for purposes of this disclosure, reflection (or reflecting)is meant to encompass reflection, diffraction, and interference oflight. The method further provides measuring the light reflected fromthe TOG and estimating a property of the formation fluid from themeasured light. For higher overall wavelength resolution, light thathave interacted with the fluid can first be filtered using an opticalband pass filter or other means to select only those wavelengths in anarrow range of wavelengths before projecting that pre-filtered lightonto the tunable grating.

In another particular embodiment the method provides for varying adistance between the first mirrored member and the second mirroredmember to sweep a wavelength of light reflected by the TOG over a rangeof wavelengths. In another aspect of the invention the method providesfor exposing a second system to light. The second system furtherprovides a second TOG having a third mirrored member and a fourthmirrored member, wherein the third mirrored member and the fourthmirrored member are substantially parallel to each other and notdirectly in contact with one another. The second system further providesa secondary formation fluid, estimating a property of the secondaryformation fluid, comparing the property of the formation fluid to theproperty of the secondary formation fluid, and determining whether theformation fluid derives from the same formation compartment as thesecondary formation fluid.

In another aspect of the invention the method provides for modulatingthe distance between the mirrored members by controlling a piezoelectricelement. In another aspect of the invention modulating the distancebetween the mirrored members by controlling a micro-electromechanicaldevice. In another aspect of the invention the range of wavelengthsincludes but is not limited to a hydrocarbon band of wavelengths. Themethod further provides locating at least one peak in the range ofwavelengths and performing wavelength modulation spectroscopy around acenter wavelength for the at least one peak.

In another aspect of the invention the method of uses the measured lightand a soft modeling technique to estimate the property of the formationfluid. In another aspect of the invention the method provides forestimating at least one of the set consisting of a carbon numberdistribution and percentage of drilling mud contamination. In anotheraspect of the invention a downhole tool is provided for estimating aproperty of a fluid downhole that provides a light source thatilluminates the fluid downhole, a TOG having two separated mirroredmembers that reflect a wavelength of light based on a control input, aphotodetector that measures light that have interacted with the fluiddownhole and been reflected by the TOG, and a processor in datacommunication with the photodetector that estimates a property of thefluid downhole from the data from the photodetector.

In another aspect of the invention the downhole further provides acircuit that adjusts the TOG for a wavelength of light and includes amodulator that modulates the wavelength. In another aspect of theinvention a control input varies a distance between the two parallelmembers. In another aspect of the invention the optical filter furtherprovides a piezoelectric element or a micro-electromechanical devicethat adjusts the distance between the two parallel members. In anotheraspect of the invention the processor uses the data from thephotodetector and a soft modeling technique to estimate the property ofthe initial formation fluid.

In another aspect of the invention the downhole further provides asecondary formation fluid in optical communication with the light sourceand the TOG, wherein the processor estimates the property of theformation fluid based on a comparison to the secondary formation fluid.Previously, commercial downhole optical spectrometers could be describedas near-infrared filter photometers. That is, commercial downholeoptical spectrometers have used fairly broadband individual opticalfilters that were centered at a handful of different discretewavelengths. The bandwidth of each optical filter was typically 20-30 nmalthough a few filters may have provided a narrower bandwidth of only 11nm, which is near the limit for interference filters that can bemanufactured for downhole applications using today's technology. Also,there was often a substantial gap in wavelength coverage between thewavelength region covered by one optical filter and the wavelengthregion covered by the next optical filter so one did not obtaincontinuous spectra at nanometer resolution.

An illustrative embodiment of the system, apparatus and method disclosedherein provides a tunable optical grating (TOG) for estimating aproperty of a fluid downhole. The TOG can be selected fromelectronically tunable optical Micro Electromechanical System (MEMS)gratings to collect spectra of downhole fluids with wavelengthresolution on the order of a nanometer. The nanometer-resolution spectracan be used to, but not limited to, estimate or determine physicalproperties and composition (synthetic chromatogram), oil-based mudfiltrate contamination, H₂S, and CO₂ concentrations for downhole fluids.The TOG reflects light at a wavelength selected by the spacing betweenmirrored members in the TOG. In an illustrative embodiment, the tunablewavelength range of TOG is continuous.

The TOG provides high wavelength resolution on the order of 1-2 nmdownhole, thereby providing continuous nanometer-resolution spectroscopy(NRS) downhole. Most, if not all, of the currently available MEMS TOGsare not are rated by their manufacturer for the high temperatures (up to175° C. or more) encountered downhole. Thus, the present inventionprovides, when desired, sorption cooling or another type cooling systemto overcome temperature limitations to enable operation of the TOG atdownhole temperatures up to and exceeding 175° C.

There are numerous advantages to using continuously tunable TOGs. Oneadvantage is that the present invention uses only a single photodetectorto perform continuous NRS downhole. Using a single photodetector tocollect data for all wavelengths greatly improves the quality of thespectra obtained because it eliminates the need to calibrate andnormalize the spectral response and sensitivity between members of anarray of photodetectors. A single detector also offers many practicaldesign advantages. With a non-tunable grating the reflected lightspectrum is spread out over a defined angle. If the angle between thegrating and the detector is fixed, then an array of detectors such as aphotodiode or CCD array can be used to collect the reflected lightspectrum. An illustrative embodiment provides a multiplexer for lowlevel signals that can operate at the high-temperatures encountereddownhole.

The present invention provides continuous NRS for estimatingconcentration of one gas in a mixture of gases such as concentration ofH₂S in a natural gas mixture. The term continuous as used herein meansthat there are no gaps in wavelength coverage of the reflected lightspectrum. That is, the difference in center wavelengths between any twoneighboring wavelength channels does not exceed twice the full-width athalf maximum wavelength response for either channel. The present exampleof the invention provides a single photo detector, rather than trying tosynchronize or calibrate the response of two photo detectors at downholeconditions. Furthermore, because the present invention can rapidly andcontinuously change the wavelength of light reflected by the TOG, thepresent invention can also perform wavelength modulation spectroscopy(WMS) about a center wavelength (or frequency) of light. WMS isdiscussed in a number of papers and texts. In one embodiment of theinvention, a hydrocarbon band (1650 nm-1850 nm) is continuously scannedand spectral peaks or other spectral features located within the band.WMS is then performed for each peak located in the band.

In a particular illustrative embodiment, a tool and method provide WMS,to obtain the first derivative of an absorption spectrum about one ormore center wavelengths by modulating the TOG's wavelength about aselected center wavelength. To calculate the change in absorbance for afluid sample (rather than absorbance, itself) using WMS, it is notnecessary to determine how much transmitted light entered a sample butonly how much the transmitted light changed from its average value afterpassing through the sample. WMS can also be performed to determinereflectance. Thus, by applying WMS, an illustrative embodiment collectsspectra using a “single beam” instrument with as much or better accuracythan a “dual beam” instrument for which errors can be introduced bydifferences between the two photodetectors (reference and sample) thatare commonly used in dual beam instruments. WMS is performed bymodulating the distance between two mirrored members in the TOG.

By definition, the absorbance A at wavelengthλ is A(λ)=log₁₀ [I ₀(λ)/I(λ)]  (1)where I₀ is the intensity of light entering the sample and I is theintensity of light exiting the sample. If one modulates the wavelengthof light from λ₁ to some nearby wavelength, λ₂, then the change inabsorbance, AA, is given by,ΔA=A(λ₂)−A(λ₁)=log₁₀ [I ₀(λ₂)/I(λ₂)]−log₁₀ [I ₀(λ_(i))/I(λ₁)]  (2)ΔA=log₁₀ [I ₀(λ₂)/I ₀(λ₁)]−log₁₀ [I(λ₂)/I(λ₁)]  (3)

One defines,ΔI=I(λ₂)−I(λ_(i))  (4)

By modulating over a spectral region where the sample's absorbance ischanging rapidly with wavelength (near an absorbance peak), one canassume that the fractional change in incident (source) intensity withwavelength is small compared to the fractional change in transmittedintensity with wavelength. That is, we assume that I₀(λ₂)/I₀(λ1)=1 sothat the first logarithmic term of (3) vanishes. Then, substituting (4)into the remaining term of (3) to obtain,ΔA=−log₁₀[(I(λ₁)+ΔI))/I(λ₁)]=−log₁₀[1+ΔI/I(λ₁)]  (5)

Note that ΔA now has no dependence on source intensity so it is notnecessary to provide a second photodetector to obtain neither the sourceintensity nor an optical multiplexer to shuttle between source andtransmitted light impinging on a single detector. This eliminates theneed for a second detector (which can be difficult to preciselycalibrate against the first detector, especially at extreme downholetemperatures) and reduces or eliminates the need for a multiplexer toswitch between the two intensities.

Because Δλ=Δλ₂−λ₁, is very small, it can be assumed that ΔI<<I(λ₁).Then, defining ε,ε=ΔI/I(λ₁).  (6)

Note that ΔI can be considered as an “AC” signal which is modulated bymodulating λ₂ about a fixed λ₁. Similarly, I(λ₁) can be considered as a“DC” signal at a fixed λ₁. The ratio, ε, of “AC” to “DC” is used tocalculate ΔA. In this way, absorbance spectroscopy can be performedwithout having to determine baseline light transmission through an emptysample cell.

Then, one can employ the expansion for the natural logarithm aboutunity,ln(1+ε)=ε−ε²/2+ε³/3−ε⁴/4+ . . . for −1<ε<1  (7)and the identity, log_(a)(N)=log_(b)(N)/log_(b)(a) to write,ΔA=−[ε−ε ²/2+ε³/3−ε⁴/4−+ . . . ]/2.303  (8)

Finally, one estimates the first derivative of spectrum about λ₁ asΔA/Δλ=−[ε−ε ²/+ε³/−ε⁴/4+ . . . ]/(2.303Δλ)  (9)

The present invention provides a nanometer-resolution spectrometer usinga TOG to enable nanometer-resolution spectral measurements to determineor estimate physical and chemical properties of a gas or fluid,including the percent of oil-based mud filtrate contamination in crudeoil samples. The present invention also enables spectral measurements todetermine or estimate the mole fraction or percent of chemical groups(aromatics, olefins, saturates) in a fluid such as a crude oil or gassample. The present invention also enables analysis ofnanometer-resolution spectral measurements to determine or estimate ordirectly measure gas oil ratio (GOR) for a fluid.

The illustrative embodiment provides a nanometer-resolution spectrometerincorporating a TOG to enable nanometer-resolution spectral measurementto determine or estimate the composition of a fluid. The illustrativeembodiment can determine or estimate other parameters of interest of afluid, such as to estimate whether crude oil contains wet gas (highmethane) or dry gas (low methane), which is determined by the relativeconcentrations of C₁, C₂, C₃, C₄. The illustrative embodiment provides ananometer-resolution spectrometer using a TOG to enablenanometer-resolution spectral measurements to determine or estimate CO₂in methane gas or CO₂ dissolved in a fluid, for example, crude oil.

The illustrative embodiment provides a nanometer-resolution spectrometerusing a TOG to enable nanometer-resolution spectral measurement toprovide improved correlation of spectral measurements to physicalproperties (API Gravity, cloud point, bubble point, asphalteneprecipitation pressure, etc.) or chemical properties (acid number,nickel, vanadium, sulfur, mercury, etc.) of crude oil. The illustrativeembodiment provides a nanometer-resolution spectrometer using a TOG toprovide nanometer-resolution spectral measurement to determine orestimate fluid properties, for example, the phytane/pristane ratios ofcrude oil.

The illustrative embodiment provides a nanometer-resolution spectrometerusing a TOG to enable nanometer-resolution spectral measurement todetermine or estimate the fluid properties such as the amount of H₂Sthat is dissolved in crude oil, which is commercially important becausethe value of a barrel of crude oil drops with increasing H₂Sconcentration due to extra costs of handling and removal of the H₂S.

The illustrative embodiment provides a nanometer-resolution TOG forspectral measurements from which a correlative equation derived fromsoft modeling (chemometrics such as multiple linear regression,principal components regression, partial least squares, or a neuralnetwork) can be used to infer physical and chemical properties of sampleformation fluids or other fluids. The illustrative embodiment takesadvantage of the TOG's rapid and continuous wavelength switchingcapability to perform derivative spectroscopy or WMS to find spectralpeaks on a shoulder of another larger spectral peak or to greatlyimprove signal to noise ratios and makes it possible to observe subtlechanges.

The illustrative embodiment enables quantification of aromatics, olefins(unlikely in crude oil but common in OBM filtrate so it can be used toquantify the percentage of filtrate), saturates, methane, ethane,propane, and butane. The illustrative embodiment determines or estimatesthe percentage of oil based mud filtrate contamination downhole,particularly if the base oil is aromatic-free (unlike crude oil) butolefin-rich (also unlike crude oil). In another embodiment, by changingthe wavelength (or frequency) of light reflected by the TOG by tuningthe TOG, the present invention also performs Raman spectroscopy incombination with a single wavelength detector for the light that isRaman scattered by the sample.

One difficulty with implementing a TOG spectrometer downhole istemperature. Typically, manufacturers rate tunable optical filters totemperatures of 80° C. or less. The illustrative embodiment of theinvention combines a TOG with a downhole sorption cooling system, whendesired. The sorption cooling system cools the TOG spectrometer toassist operating the TOG spectrometer at high ambient temperaturesdownhole. The TOG and associated TOG spectrometer components can beplaced in thermal contact with a source of water (either as a liquid oras a hydrate). The TOG is cooled as water is evaporated from liquid orreleased by hydrate. The resulting water vapor which carries heat awayfrom the TOG and is sorbed by a sorbent, which becomes hotter in theprocess. The sorbent transfers its excess heat to the well bore fluidwith which it is in thermal contact. It would also be useful todetermine the change in response of the TOG with temperature so that onecould correct for its temperature response if the TOG's temperaturechanged substantially during the downhole job as might occur if one ranout of water coolant before the job was completed.

In an illustrative embodiment, a TOG is used to performnanometer-resolution spectroscopy sweeps of the section of thehydrocarbon band which spans from about 1650-1850 nm. Other wavelengthbands can be swept as well depending on what elements or measurementsare desired in measuring spectral transmissivity, reflectivity, andabsorbance or fluorescence luminance response. From these TOGtransmissivity, reflectivity, fluorescence luminance or absorbancespectral measurements, the present invention quantifies aromatics,olefins (unlikely in crude oil but common in OBM filtrate, whichtherefore provides one way to estimate filtrate contamination percentagebased on olefin measurements), saturates, methane and possibly ethane,propane, and butane. With TOG nanometer-resolution spectroscopy, theillustrative embodiment determines or estimates the percentage of oilbased mud (OBM) filtrate contamination downhole in a formation fluidsample, particularly if the OBM contaminants are aromatic-free butolefin-rich. The illustrative embodiment can estimate the degree offormation fluid clean up or removal of contamination by monitoring aproperty of OBM present in a formation fluid.

Furthermore, with nanometer-resolution spectroscopy provided by aparticular illustrative embodiment, the particular illustrativeembodiment can determine or estimate subtle chemical compositionaldifferences between two formation fluids taken at different depths in awell bore. Such differences can be used to assess thecompartmentalization of a reservoir, which means to determine whetherdifferent sections of a reservoir are separate compartments (acrosswhich fluids do not flow) or whether they are connected to each other.Separate compartments must be drained separately (separate wells) andmay need different types of processing for their fluids.

Multi-billion dollar decisions on how to develop a reservoir (welllocations, types of production facilities, etc.) are based on whether ornot a reservoir is compartmentalized. One way to assesscompartmentalization is based on phytane/pristane ratios of liquid crudeoil or by using any other distinguishing features such as any unexpectedsubtle differences in the fluid spectra that are capable of beingresolved using a TOG. Gravity segregation will cause some expectedspectral differences in fluids from different depths even when there isno compartmentalization. For example, one expects the top of a column ofcrude oil to be more gas rich than the bottom. For a 2 mm path length,the dominant liquid (C6+) hydrocarbon optical absorption peaks are near1725 nm, while the corresponding absorbance peaks of hydrocarbon gasessuch as methane, ethane, propane, butane, lie between 1677 nm and 1725nm. Subtle differences in spectra outside the regions where thesehydrocarbon gases absorb are unexpected and therefore provide evidenceof compartmentalization.

In one aspect of the invention, MEMS or piezoelectric devices aredisposed in between a first and second mirrored member for operativelyapplying forces to vary a distance between the first and second mirroredmembers. MEMS and piezoelectric technology are well known to thoseskilled in the art. MEMS is a process whereby micron-sized mechanicaldevices are fabricated on silicon wafers by photolithography and etchingtechniques. These mechanical devices are formed on integrated circuitchips so that devices, which incorporate MEMS technology, essentiallybecome miniature electromechanical systems. MEMS devices are activatedby analog voltages which create an electric field that will cause theMEMS devices to physically deflect since they are made of silicon andtherefore respond to the electric field.

Accordingly, in one particular embodiment a DC power supply controlledby a processor is connected to MEMS or piezoelectric devices throughleads to bias MEMS devices and variation in the distance between thefirst and second mirrored members. In another particular embodiment, thedistance between the first and second rows of mirrored members does notvary, and individual members or elements of the rows of mirrored membersare turned off and on for optical multiplexing, which is discussedbelow. One of the advantages of using MEMS devices on a siliconintegrated circuit chip is that MEMS devices are low mass, low power,and low voltage devices.

The low mass means that the MEMS device has low sensitivity to shock andvibration, which is important in wireline applications and even moreimportant in logging while drilling applications, where shock andvibration is even worse. The low voltage and low power means that onecan use ordinary printed circuit board designs and use battery power inconjunction with the MEMS devices if desired. Preferably, voltages ofbetween about 0 and 10 volts are provided to control the desireddeflection of MEMS or piezoelectric devices. These low voltages help toensure low attenuation of the cavity signals and low insertion losses.Applied voltages of between about 0 and 10 volts also reduce thepolarization dependent loss for high signal attenuation. Moreover, whilepower supply source has been described as a DC power supply, it will berecognized by those with skill in the art that power supply couldalternately be an AC source with appropriate rectifying circuitry, or anAC source that directly applies power to MEMS devices where MEMS devicesare configured for actuation by AC power.

MEMS devices can be any kind of micro electro mechanical system actuatoroperable to uniformly and easily move mirrored members of a tunableoptical grating. For example, cantilevered arms, pivot points,spring-like or other resilient mechanisms, levers, moment arms, torquegenerating devices, and other devices and equivalents thereof that canapply the correct amount of force to the mirrored members are allconfigurable in silicon MEMS devices and are within the scope of thepresent invention. In the illustrative embodiment, MEMS devices areimplemented by a pair of pistons that are extendable to uniformly pushagainst mirrored mirrors to separate mirrored members. The MEMS deviceis physically connected to leads to receive power from the power supply.

The illustrative embodiment provides a downhole instrument that canmeasure real-time, nanometer-resolution, continuous optical spectra offluids, particularly over the hydrocarbon band region of the spectrum.Nanometer-resolution spectra (that is, resolution in the 1-2 nanometerrange) over the near-infrared hydrocarbon band (1650-1850 nm) containdetailed information about hydrocarbons. Such information is of highcommercial value to the oil industry. For example, from the hydrocarbonband region, one can obtain information about the ratio of methyl (—CH₃)to methylene (—CH₂), which is indicative of the average hydrocarbonchain length and information on the relative concentrations of methane,ethane, propane, butane, and so on.

This spectral region also contains information on the concentrations ofaromatics, olefins, and paraffins, which could be used for quantifyingthe percentage of oil-based mud (OBM) filtrate in a crude oil mixture.For example, for environmental friendliness, synthetic base oils forOBMs are designed to be free of aromatics, whereas crude oils alwayshave some aromatics. Conversely, many synthetic muds contain olefins oresters, which are not present in crude oils. These distinctions providea means to quantify percentages of OBM filtrate in mixtures of filtratewith crude oil. Of course, to reliably glean such subtle informationfrom the spectra it is useful to have high spectral resolution (both inwavelength and absorbance) as provided in an illustrative of aparticular illustrative embodiment.

It is possible to assess hydrocarbon chain length from the ratio methylto methylene by applying Fourier transform infrared (FTIR) spectroscopyto individual fluid inclusions greater than 15 microns in rock using anA-590 Bruker microscope linked to an FTIR Bruker IFS 88 spectrometer (JM Dereppe, J. Pironon, C. Moreaux, American Mineralogist, v. 79, p.712-718, 1994). An infrared beam, and an MCT detector, cooled withliquid N2, allowed the IR detection between 600 and 5000 cm−1 (Barres etal., 1987). The spectra, presented in absorbance units and wave numbers(cm−1), were recorded in the transmission mode with a spectralresolution of 4 cm−1 after 400 accumulations. A chain-length coefficientcan be calculated by comparing CH3-CH2 ratio of the sample to the sameratios measured on a standard n-alkane series.

In an illustrative embodiment, the present invention provides a TOG toreflect a band of wavelengths of broad band or white light. White lightthat has interacted with a fluid sample is reflected off of the TOG toan optical sensor. The optical sensor can include, but is not limited toa single photodetector and amplifier which can sense the light reflectedoff of the TOG. A continuously variable wavelength control is providedto the TOG to enable creation of nanometer-resolution spectra forperforming chemometric correlations for estimation of percentage of oilbased mud filtrate to gas oil ratio and spectrally-inferred syntheticchromatograms.

In an illustrative embodiment white light is transmitted through a firstwindow, though a formation fluid or down hole fluid, through a secondwindow and onto the TOG. The TOG acts as a diffraction element. Light isdetected as it is reflected off of the TOG. The individual elements ofthe TOG can be grouped together into groups or sections. Control systemelectronics continuously adjust the voltages applied to various sectionsof the TOG elements to change the wavelength or wavelengths of lightreflected by the TOG elements within the selection wavelength range. Ina particular illustrative embodiment, a photodetector is provided todetect the light that has interacted with a down hole fluid andreflected off of the TOG. When desired, a transform, such as a Hadamardtransform can be used to recover a spectrum for the reflected light. Theapplication of the Hadamard transform is discussed below in connectionwith FIG. 9.

Spectral peaks can be identified in the reflected light collected fromthe optical spectra of the swept wavelength band. The TOG can oscillatearound a single wavelength coincident with a center wavelength for oneor each of the spectral peaks for derivative spectroscopy. Derivativespectroscopy reduces the effects of baseline offset and artifacts.Reduction of offsets and artifacts facilitates maintenance of robustchemometric predictions of fluid properties based on spectra for thefluid. WMS can also be performed using optical multiplexing or selectiveactivation of the TOG or optical grating elements to selectively reflectdifferent bandwidths of light from the activate TOG elements or elementsections, as discussed below with FIG. 9, by optically multiplexingbetween two near by frequencies reflected by two adjacent or nearbyelements on the TOG which are alternately turned on and off toalternately reflect different nearby wavelengths of light from thefluid.

One particular illustrative embodiment provides a piezoelectric or MEMScontrolled TOG that is suitable for downhole use in part because the TOGis small, light weight and temperature resistant. In a particularillustrative embodiment, the TOG is resistant to vibration and shockdownhole because it can be a low mass device manufactured on anelectronic semiconductor device or piezoelectric material. In anotherillustrative embodiment, the TOG is also physically small so that it canbe easily retrofitted into an existing downhole tool with minimalreengineering for physical space, power, light or control. In anotherillustrative embodiment, the TOG can potentially withstand temperaturesup to 175° C. or more, which makes it suitable to withstand hightemperatures for downhole use. In another illustrative embodiment,sorption can be added to bolster the TOG's ability to withstand downholetemperatures.

In another illustrative embodiment, the TOG also has no macroscopicallymoving parts. The wavelength of light reflected by the TOG is controlledby microscopic movement varying a distance between two mirrored members.Thus in an illustrative embodiment, the TOG is durable and robust, thussuitable for downhole use.

In another particular illustrative embodiment, white light isalternately directed through an unknown fluid sample and a referencechamber containing a reference compound having a known optical spectrum.White light can also be reflected off of the unknown fluid sample forthe collection of reflectance spectra for the fluid sample. Spectra arecollected for the unknown fluid and for the reference fluid. Thespectrum of the reference fluid is compared and correlated to thespectrum of the unknown fluid sample. Thus, through comparing andcorrelating the unknown fluid spectrum with the reference fluid spectrumover wavelength regions where the unknown fluid's matrix spectrum doesnot interfere with the reference compound's spectrum, the concentrationof reference compound in the unknown fluid matrix can be estimated.

For example, if the reference fluid contains one hundred parts permillion (PPM) of a particular component (for example, H₂S) and theunknown fluid has a spectrum which looks the same but which has twicethe absorbance at each non-interfering wavelength, then the unknownfluid can be estimated to contain two hundred PPM H₂S.

Turning now to FIG. 1, FIG. 1 is a schematic diagram of an illustrativeembodiment of the tool deployed in a borehole 18 on a wire line in adownhole environment. As shown in FIG. 1, a downhole tool 10 containinga downhole MEMS nanometer-resolution spectrometer 410 is deployed in aborehole 14. The borehole 18 is formed in formation 16. Tool 10 isdeployed via a wireline 12. Data from the tool 10 can be transmitted tothe surface to a computer processor 20 with memory inside of anintelligent completion system 30.

FIG. 2 is a schematic diagram of another illustrative embodiment of thetool having a MEMS nanometer-resolution spectrometer deployed on a drillstring 15 in a monitoring while drilling environment. FIG. 3 is aschematic diagram of another illustrative embodiment having a MEMSnanometer-resolution spectrometer deployed on a flexible tubing 13 in adownhole environment. Sampling and analysis by MEMS nanometer resolutionspectrometer 410 can be performed at variable depths whether deployedfrom a wire line 12, drill string 15, or flexible tubing 13.

FIG. 4 is a schematic diagram of an illustrative embodiment of thepresent invention as deployed in a borehole 18 in a wire line downholeenvironment showing a cross section of a wireline formation tester tool10. As shown in FIG. 4, the tool 10 is deployed in a borehole 14 filledwith borehole fluid 434. The tool 10 is positioned in the borehole 18 bybackup support arms 416. A snorkel 418 with packer contacts the boreholewall 432 for extracting formation fluid from the formation 414. In anillustrative embodiment, tool 10 contains downhole MEMSnanometer-resolution spectrometer 410 containing the TOG disposed in ornear flow line 426. The control and acquisition electronics (350 asshown in FIG. 5) which include a processor, memory and data bases shownin FIG. 6 are housed in the tool 10. Pump 412 pumps formation fluid fromformation 414 into flow line 426. In the illustrative embodimentformation fluid travels through flow line 426 and into valve 420 whichdirects the formation fluid to line 422 to save the fluid in a sampletank or to line 428 where the formation fluid exits to the borehole.

Turning now to FIG. 5, another illustrative embodiment of the tool isillustrated. As shown in FIG. 5, a light source 201 provides light 202to collimating lens 203. Collimated white light 204 is transmittedthrough a first window 303, though a formation fluid or down hole fluid341, through a second window 302 and onto the TOG 250. The tunablegrating acts as a diffraction element. Reflected light 233 is detectedby optical detector 230 as it is reflected off of the TOG 250. Mirrorspacing control electronics 350 sweep the wavelength of the TOG 250 overa selected band of frequencies and wavelengths. A photodetector 230 andan order-sorting blocking filter 232 are used to detect the lightreflected off of the TOG 250. A transform, for example, a Hadamard typetransform can be used to recover a spectrum or spectra for the fluidfrom the detected light. Electrical power is provided by power supply351 which can be a battery.

To collect a spectrum more quickly, the entire MEMS tunable opticalgrating, consisting of a multiplicity of mirrored members, can besubdivided into a hundred or more regions or sets of mirrored members orelements, each of which is then operated as if it was a separate gratingdedicated to a single wavelength. Then, each separate grating elementset can either project or not project its dedicated wavelength of lightonto the spectrometer's photodetector. Each separate grating can then bethought of as an “on-off” filter for its dedicated wavelength.

This configuration acts as an optical multiplexer which allowsprojection of more than one wavelength (e.g. 50 wavelengths) or morethan one band of wavelengths, simultaneously onto a single opticalsensor, such as a photodetector and then sequentially cycle throughvarious predetermined patterns of projected wavelengths. A mathematical(Hadamard) transform can then be used to process the data ofphotodetector response for each pattern to determine the amount of lightthat would have detected at each individual wavelength. This approach isthe basis of Hadamard spectroscopy. This configuration also allows oneto mimic absorption spectra of a reference sample (e.g. H2S) byprojecting all wavelengths but those wavelengths at which the samplewould absorb light.

In another particular embodiment, a set of light diverters, for example,mirrors 343, 344, 345, and 347, can be used to redirect light 204through reference sample 342. Light diverter 347 can be rotated so thatin the position shown, mirror 347 reflects light 204 from light diverter345 and intercepts light from sample 341. Light 204 reflects off ofmirror 343 to mirror 344 through reference sample 342 to mirror 345where it is reflected off of mirror 347 into light path 204 to impingeon TOG 250.

The back side 346 of mirror 347 intercepts light passing through sample341. when in the position shown in FIG. 5 and reflects light passingthrough the reference sample. When mirror 347 is rotated from theposition shown to the position shown by dashed line 348, light from thesample 341 is not intercepted and passes to strike TOG 250 and lightfrom reference sample 342 is not reflected to TOG 250.

Rotating mirror 347 is positionally controlled by a motor controlled by20 electronics 350. Thus, the illustrative embodiment enables comparisonof spectra for reference sample 342 to spectra for reference sample 341.Spectra for reference sample 342 can be obtained at the surface andcompared to spectra for the reference sample obtained downhole torecalibrate the TOG spectrometer for downhole temperature measurements.

Turning now to FIG. 6, in another particular illustrative embodiment,the TOG 250 comprises a multiplicity of mirrored members or elementsaligned along rows 254 and 256, which may include a lower row or set ofgrating elements or mirrors 254 and an upper row or set of gratingelements or mirrors 256 on a MEMS semiconductor chip 258. The two rowsor sets of elements or mirrored members 254, 256 can each be dividedinto smaller subsets or regions. The smallest subset of a row ofelements would be an individual element or member of a row. Each smallerelement, sub set or region can be independently controlled to reflect ornot reflect light. A piezoelectric device may be incorporated into theMEMS chip. A feed back loop 266 may be provided between the opticaldetector 230 and mirror spacing and region control electronics 350.

The mirror spacing control electronics 350 can include a processor 630,memory 632 and database 634 for storing a computer program for executionby the processor. The computer program can contain instructions to findpeaks within a hydrocarbon band and perform derivative spectroscopyaround a center wavelength for each of the peaks. The spacing 255 ordistance between the upper 256 and lower 254 mirrored members determinesthe wavelength of light reflected off of the TOG 250 to the opticaldetector 230 through the order-sorting blocking filter 232.

Turning now to FIG. 7, a flow chart 700 is shown wherein in anillustrative embodiment of a method and apparatus, spectra are collectedfor an unknown fluid downhole at block 702. Spectra are then collectedfor a reference fluid sample downhole at block 704. The collectedreference fluid spectra and unknown fluid spectra are collected andcompared at block 706. Composition for the unknown fluid is estimated atblock 708 and the process ends.

Turning now to FIG. 8, a flow chart 800 is shown wherein in anotherillustrative embodiment a wavelength range is continuously. (that iswithout an interruption in spectral coverage) swept over a hydrocarbonband at block 802 for an unknown fluid. In an illustrative embodimentthe process finds spectral peaks and subpeaks (on the shoulders oflarger peaks) in the hydrocarbon range at block 804. Wavelengthmodulation spectroscopy is performed for each peak and subpeak andderivative spectra estimated at block 806. Composition of the unknownfluid is estimated from spectra at block 808 and the process ends.

Spectral peaks can be identified in the hydrocarbon band of wavelengthsswept by mirrored member spacing control and data acquisitionelectronics 350. Derivative spectrometry can be performed centered abouta single wavelength coincident with a single center wavelength for oneor each of the spectral peaks. Derivative spectroscopy reduces theeffects of baseline offset and artifacts. Reduction of offsets andartifacts facilitates maintenance of robust chemometric predictions offluid properties based on spectra for the fluid.

Turning now to FIG. 9, in a particular illustrative embodiment, agrating such as TOG 250 comprises a multiplicity of mirrored members orelements aligned along an upper row 256 and a lower row 254. In anotherparticular illustrative embodiment the grating is not tunable but hasselectable elements for reflecting and not reflecting light from theupper row of mirrored members. Thus, the grating can be used for opticalmultiplexing, however, the distance between the upper row of elementsand the lower row of elements for the grating is not adjustable (i.e.,tunable), thus the optical grating is referred to as a selectableoptical grating (SOG) rather than as a TOG. TOG mirrored members whichmay include but are not limited to a lower set or row of elements ormember such as grating mirrors 254 and an upper set of grating mirrors256 on a MEMS semiconductor chip 258. Each mirrored member or element251, 253, 257, 259, 261 and 263 of the upper set or row of mirroredmembers 256 can each be turned on an off independently. Each mirroredmember reflects incident light impinging upon the mirrored member whenthe mirrored member is turned on and does not reflect incident lightwhen the mirrored member is turned off.

In another illustrative embodiment, each independent element of thelower and upper row of mirrored members 254, 256 can be individuallyturned on and off. The selectable on and off state for each mirroredelement or member of the SOG or TOG is controlled by member controlelectronics 350. A piezoelectric device may be incorporated into theMEMS semiconductor chip 258. A feed back loop 266 may be providedbetween the optical detector 230 and mirror spacing and member controlelectronics 350. The member control electronics 350 can include aprocessor 630, memory 632 and database 634 for storing a computerprogram for execution by the processor. The computer program can containinstructions to find peaks within a hydrocarbon band and performderivative spectroscopy around a center wavelength for each of thepeaks. Each of the mirrored members or elements can be turned on or offto determine the wavelength or band of frequencies or wavelengths oflight reflected off of the TOG 250 to the optical detector 230. Theelements can also be separated into groups for control at the grouplevel for reflecting and not reflecting as a selectable group ofelements. In another particular illustrative embodiment the lightreflected from the TOG passes through the order-sorting blocking filter232.

In another particular illustrative embodiment, a white light sourcesupplies white light 202 that passes through sample 341. The lightpassing through the sample is directed onto a fixed grating 206 whichdivides the light 204 that has passed through the sample into multiplefrequencies or band of frequencies (or bands of wavelengths) f₁-f_(n)281, 283, 285 and 287. The fixed grating directs a different frequencyor different band of frequencies of light onto each of the mirroredmembers or elements in rows 254 and 256. Similarly, light that has beenreflected off of the sample can be divided into multiple frequencies ormultiple bands of frequencies (or bands of wavelengths) f₁-f_(n) 281,283, 285 and 287.

Thus a single frequency or single band of frequencies can be selectedfor reflection of incident light impinging upon a particular mirroredmember or element by turning on the mirrored member upon which thesingle frequency of incident light impinges. In one particularembodiment, the angle of the incident light 204 upon the two rows ofmirrored members or elements is such that light is reflected only fromthe upper row 256 and not from the lower row 254. Thus each one of themirrored members in row 256 can be individually turned on one frequencyor band of frequencies reflected by each of the mirrored members orelements in row 256 one at a time to collect light from reflected fromthe single element that is turned on. Thus, by directing a singlefrequency of band of frequencies onto individual mirrored members andturning the mirrored members on one at a time, light from the sample canbe optically multiplexed in this manner to perform Hadamard spectroscopyto find spectral peaks for performing analysis of the sample 202.

In another illustrative embodiment, the spacing 255 or distance betweenthe upper 256 and lower 254 mirrored members can be controlled by membercontrol electronics which changes the frequency of light reflected bythe upper row 256 and lower row 254 of mirrored members.

Turning now to FIG. 10, a flow chart 1000 is shown wherein in anotherillustrative embodiment a fluid is exposed to light downhole at block1002. Different wavelengths of light that have interacted with a fluidlight is directed toward a first optical grating at block 1004. Lightmeasured at different wavelengths is reflected from a first opticalgrating at block 1006. Property of the fluid is estimated from themeasured light at block 1008. Light is selected from a group consistingof light reflecting off of the fluid and light passing through the fluidat block 1010. A portion of the plurality of elements is activated onthe first optical grating to select a band of wavelengths of lightreflected by the activated portion at block 1012. Different wavelengthsof light are reflected that have interacted with fluid from a secondoptical grating that reflects a different wavelength of light onto eachof the elements of the first optical grating at block 1012. In anotherillustrative embodiment a secondary fluid is exposed to light at block1014. The property of the secondary fluid is estimated at block 1016.The property of fluid is compared to the property of the second fluid atblock 1018. It is determined whether fluid derives from the sameformation compartment as the secondary fluid at block 1020. In anotherillustrative embodiment plurality of elements includes an upper row ofelements alignment above a lower row of elements at block 1022. A lowerrow of elements does not reflect light from the first optical grating atblock 1024. In another illustrative embodiment a Hadamard spectroscopyis performed on light measured from activated portion of first opticalgrating at block 1026. Light reflected from each element of firstoptical grating is optically multiplexed at block 1028. First opticalgrating includes tunable optical filter and elements include mirroredmembers at block 1030. Light reflected from TOG filtered beforereflected light is measured at block 1032.

While the foregoing disclosure is directed to the exemplary embodimentsof the invention various modifications will be apparent to those skilledin the art. It is intended that all variations within the scope of theappended claims be embraced by the foregoing disclosure. Examples of themore important features of the invention have been summarized ratherbroadly in order that the detailed description thereof that follows maybe better understood, and in order that the contributions to the art maybe appreciated.

1. A method for estimating a property of a fluid downhole, comprising:exposing the fluid to light downhole; directing different wavelengths oflight that have interacted with the fluid light toward a first opticalgrating; measuring light at different wavelengths reflected from thefirst optical grating; and estimating a property of the fluid from themeasured light.
 2. The method of claim 1, wherein the light interactingwith the fluid further comprises light selected from the groupconsisting of light reflecting off of the fluid and light passingthrough the fluid.
 3. The method of claim 1, wherein the first opticalgrating further comprises a plurality elements, the method furthercomprising: activating a portion of the plurality of elements on thefirst optical grating to select a band of wavelengths of light reflectedby the activated portion.
 4. The method of claim 3, further comprising:reflecting different wavelengths of light that have interacted with thefluid from a second optical grating that reflects a differentwavelengths of light onto each of the elements of the first opticalgrating.
 5. The method of claim 1, further comprising: exposing asecondary fluid to light; estimating a property of the secondary fluid;comparing the property of the fluid to the property of the secondaryfluid; and determining whether the fluid derives from the same formationcompartment as the secondary fluid.
 6. The method of claim 3, whereinplurality of elements further comprises an upper row of elements alignedabove a lower row of elements.
 7. The method of claim 6, wherein thelower row of elements does not reflect light from the first opticalgrating.
 8. The method of claim 3, further comprising: performingHadamard spectroscopy on the light measured from the activated portionof the first optical grating.
 9. The method of claim 3, furthercomprising: optically multiplexing the light reflected from each elementof the first optical grating.
 10. The method of claim 3, wherein thefirst optical grating further comprises a tunable optical filter and theelements further comprise mirrored members.
 11. The method of claim 3,further comprising: filtering the light reflected from the TOG beforethe reflected light is measured.
 12. A downhole tool for estimating aproperty of a fluid downhole, comprising: a light source thatilluminates the fluid downhole; a first optical grating having aplurality of elements that selectively light that have interacted withthe fluid; and a sensor that measures the light reflected from the firstoptical grating elements.
 13. The tool of claim 12, further comprising:a grating that reflects a different wavelength of light onto each of theplurality of elements of the first optical grating, wherein whenactuated, each of the plurality of elements reflects the differentwavelength of light.
 14. The downhole of claim 12, further comprising: acircuit that selectively actuates each of the elements of the firstoptical grating to vary a wavelength of light reflected by the firstoptical grating.
 15. The downhole tool of claim 12, further comprising:a filter positioned between the optical detector and the first opticalgrating that reduces the spectra of light reflected from the firstoptical grating.
 16. The downhole tool of claim 12, further comprising:a filter positioned between the fluid and the first optical grating thatreduces the spectra of light reflected from the fluid.
 17. The downholetool of claim 12, further comprising: a processor in data communicationwith the photodetector that estimates a property of the fluid downholefrom data from the photodetector, wherein the processor is configured touse the data from the photodetector and a soft modeling technique toestimate the property of the fluid.
 18. The downhole tool of claim 17,further comprising: a reference fluid in optical communication with thelight source and the first optical grating, wherein the processor isconfigured to estimate the property of the fluid based on a comparisonto the reference fluid.
 19. The downhole tool of claim 12, wherein theelements further comprises a multiplicity of mirrored members, whereinthe elements are individually selectable to reflect the light.